(function () {
    Array.prototype.contains = function (obj) {
        var i = this.length;
        while (i--) {
            if (this[i] === obj) {
                return true;
            }
        }
        return false;
    };
    Array.prototype.sortNum = function (sortby) {
        var self = this;
        self.sort(function (a, b) {
            return a - b
        });
        sortby = sortby ? sortby.constructor === Number ? sortby === 0 ? -1 : sortby : -1 : -1;
        sortby > 0 ? self.reverse() : false;
    }
} ());